import request from '@/utils/request'

// 获取商品规格分页信息
export function productSpecPageList(obj) {
    return request({
        url: `/product/productSpec/page`,
        method: 'get',
        params: obj
    })
}
//新增商品规格
export function addProductSpec(data) {
    return request({
        url: `/product/productSpec`,
        method: 'post',
        data
    })
}
//修改之前的回显
export function productSpecList(id) {
    return request({
        url: `/product/productSpec/${id}`,
        method: 'get'
    })
}
export function updateProductSpec(data) {
    return request({
        url: `/product/productSpec`,
        method: 'put',
        data
    })
}
//删除
export function deleteProductSpec(id) {
    return request({
        url: `/product/productSpec/${id}`,
        method: 'delete'
    })
}
// 根据分类获取分类规格
export function getCategorySpecAll(categoryId) {
    return request({
        url: '/product/productSpec/productSpecList/' + categoryId,
        method: 'get'
    })
}